OS - Introduction
Answer
OS functions as extended machine and resource manager. OS hides the truth about the hardware from the programmer and provides a nice, easy to use, simple view of named files that can be read and written. OS shields user from the hardware and presents a simple file-oriented interface. In this view OS can be considered as extended machine or virtual machine that is easier to program than the underlying hardware.
The job of operating system is to provide an orderly and controlled allocation of the processes, memories, and I/O devices among the various programs competing for them. When a computer has multiple users, Operating system manages and protects the memory, I/O devices, and other resources so users might not interfer with each other.
Answer: Operating system is a portion of software that runs in kernel mode or supervisor mode. It is protected from user tampering the hardware.
Answer: System calls are also known as extended instructions. System calls or extended instructions are provided by operating system to interface between the oparating system and the user programs.
A process is basically a program in execution. Each process is associated with its address space, a list of memory locations, which the process can read and write. The address space contains the program's data, its stack, and the executable program, some set of registers, including the program counter, stack pointer, and other hardware registers, and all teh other information needed to run the program.
Answer: Process table is an array (or linked list) of structures which stores all the information about each process, other than the contents of its own address space.
A suspended process consisting of its address space is called the core image.
The protection code consists of 3-bit fields, one for the owner, one for other members of the owner's group, and one for everyone else. Each field has a bit for read access, a bit for write access, and a bit for execute access. These bits are known as the rwx bits. For example, the protection code rwxr-x--r means that the owner can read, write or execute the file, other group members can read or execute (but not write) the file, and everyone else can read ( but cannot write or execute) the file. Here, dash means permission is absent.
Answer: Block special files are used to model devices consisting of a collection of randomly addressable blocks, such as disk. Character speical files are used to model printers, modems and other devices as these devices accept or output a character stream.
Answer: A pipe is a sort of pseudofile that is used to connect tow processes together. When a process X wants to send data to process Y, it writes on the pipe. Process Y can read the data by reading from the pipe as though it were an input file.
Answer: